package com.wendyxie.sproutup.entity

import java.time.LocalDateTime
import java.util.*

data class UserTreeEntity(
    var userId: String, // 用户ID
    var babyId: String, // babyID
    var userTreeId: String, // 兑换记录ID，随机数
    var treeId: String, // 树ID
    var treePrice: Int, // 树金额
    var treeName: String, // 树名称
    var treeImageUrl: String, // 树图片链接
    var exchangeTime: LocalDateTime, // 兑换时间

) {
    // 创建兑换记录时，userTreeId为空
    constructor(
        userId: String,
        babyId: String,
        treeId: String,
        treePrice: Int,
        treeName: String,
        treeImageUrl: String,

        ) : this(
        userId,
        babyId,
        "",
        treeId,
        treePrice,
        treeName,
        treeImageUrl,
        LocalDateTime.now(),

        )
}
